        <h3 class="line-bottom">Membros</h3>
<div class="communities white ">
	<?php echo $this->Form->create('Community',array('type'=>'file')); ?>
        <ul class="nav nav-tabs" id="settingsuser">
            <li class="active"><a href="#membros">Membros</a></li>
            <li><a href="#moderadores">Moderadores</a></li>
            <li><a href="#pendentes">Pendentes</a></li>
        </ul>
        
        <div class="tab-content members">
            
            <div class="tab-pane active" id="membros">
                <ul class="row list-members">
                <?php 
                    foreach ($users as $user) {        

                       ?>
               
                <li class="clear-fix col-lg-3">	  
                    <div class="well">
                    <a class="pull-left photo" href="/@<?php echo $user['users']['username']?>">
                        <img class="media-object img-quad shadow" src="/img/users/<?php echo $user['users']['photo'] ?>">
                    </a>
                    <div >
                    <a href="/@<?php echo $user['users']['username']?>"><?php echo $user['users']['first_name'].' '.$user['users']['last_name']; ?></a>
                    <p><small><?php echo $user['users']['username']; ?></small>

                         <?php if ($this->Community->userPartModerador($idUser,$id)) {
                        echo '<br><a href="/communities/ban/'.$id.'/'.$user['users']['id'].'" class=""><i class="glyphicon glyphicon-remove-sign"></i> Banir</a><br>';
                        echo '<a href="/communities/moderator/'.$id.'/'.$user['users']['id'].'" class=""><i class="glyphicon glyphicon-certificate"></i> Tornar moderador</a><br>';
                        echo '<a href="/communities/deleteUser/'.$id.'/'.$user['users']['id'].'" class=""><i class="glyphicon glyphicon-trash"></i> Excluir</a>';
                        }?>
                    </p>
                    </div>
                    </div>
                </li>
                
                
                

                <?php 
                }
                ?>
                </ul>
            </div>
            
            <div class="tab-pane " id="moderadores">
                
                <ul class="row list-members">
                <?php 
                    foreach ($usersModerador as $user) {        
                ?>
                    <li class="clear-fix col-lg-3">	  
                        <div class="well">
                        <a class="pull-left photo" href="/@<?php echo $user['users']['username']?>">
                            <img class="media-object img-quad shadow" src="/img/users/<?php echo $user['users']['photo'] ?>">
                        </a>
                        <div >
                        <a href="/@<?php echo $user['users']['username']?>"><?php echo $user['users']['first_name'].' '.$user['users']['last_name']; ?></a>
                        <p><small><?php echo $user['users']['username']; ?></small></p>
                        </div>
                        </div>
                    </li>


                <?php 
                }
                ?>
                </ul>
            </div>

            <div class="tab-pane " id="pendentes">
                <ul class="row list-members">
                <?php if ($this->Community->userPartModerador($idUser,$id)) {
                    foreach ($usersPendentes as $user) {        
                ?>
                    <li class="clear-fix col-lg-3">	  
                        <div class="well">
                        <a class="pull-left photo" href="/@<?php echo $user['users']['username']?>">
                            <img class="media-object img-quad shadow" src="/img/users/<?php echo $user['users']['photo'] ?>">
                        </a>
                        <div >
                        <a href="/@<?php echo $user['users']['username']?>"><?php echo $user['users']['first_name'].' '.$user['users']['last_name']; ?></a>
                        <p><small><?php echo $user['users']['username']; ?></small>

                            <?php
                            echo '<br><a href="/communities/approve/'.$id.'/'.$user['users']['id'].'" class=""><i class="glyphicon glyphicon-certificate"></i> Aceitar pedido</a><br>';
                            echo '<a href="/communities/deleteUser/'.$id.'/'.$user['users']['id'].'" class=""><i class="glyphicon glyphicon-remove"></i> Rejeitar</a>';
                            ?>
                        </p>
                        </div>
                        </div>
                    </li>
                <?php
                }}
                ?>	
                </ul>
            </div>
</div>
